Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't load custom emojis in their full size #4429

Merged
merged 1 commit into from
May 10, 2024
Merged

Conversation

connyduck
Copy link
Collaborator

This should save quite some memory, but most importantly it gets rid of this crash:

java.lang.RuntimeException: Canvas: trying to draw too large(121969936bytes) bitmap.
           at android.graphics.RecordingCanvas.throwIfCannotDraw(RecordingCanvas.java:266)
           at android.graphics.BaseRecordingCanvas.drawBitmap(BaseRecordingCanvas.java:94)
           at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:549)
           at com.keylesspalace.tusky.util.EmojiSpan.draw(CustomEmojiHelper.kt:131)
           ...

@connyduck connyduck requested review from Tak and charlag May 8, 2024 19:48
@connyduck connyduck merged commit 4dec228 into develop May 10, 2024
3 checks passed
@connyduck connyduck deleted the fix-emoji-size-crash branch May 10, 2024 10:22
connyduck added a commit that referenced this pull request May 10, 2024
This should save quite some memory, but most importantly it gets rid of
this crash:

```
java.lang.RuntimeException: Canvas: trying to draw too large(121969936bytes) bitmap.
           at android.graphics.RecordingCanvas.throwIfCannotDraw(RecordingCanvas.java:266)
           at android.graphics.BaseRecordingCanvas.drawBitmap(BaseRecordingCanvas.java:94)
           at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:549)
           at com.keylesspalace.tusky.util.EmojiSpan.draw(CustomEmojiHelper.kt:131)
           ...
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants